#ifndef _LINUX_BOOTMEM_H
#define _LINUX_BOOTMEM_H
#include <asm-i386/page.h>
#include <linux/cache.h>
#include <asm-i386/dma.h>
#include <linux/mmzone.h>
extern unsigned long max_low_pfn;
extern unsigned long min_low_pfn;
extern unsigned long max_pfn;
extern void * __alloc_bootmem (unsigned long size, unsigned long align, unsigned long goal);
extern void * __alloc_bootmem_node (pg_data_t *pgdat, unsigned long size, unsigned long align, unsigned long goal);
#define alloc_bootmem_node(pgdat, x) \
	__alloc_bootmem_node((pgdat), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
#define alloc_bootmem_low_pages(x) \
	__alloc_bootmem((x), PAGE_SIZE, 0)
/*
 * node_bootmem_map is a map pointer - the bits represent all physical
 * memory pages (including holes) on the node.
 */
typedef struct bootmem_data {
    unsigned long node_boot_start;
    unsigned long node_low_pfn;
    void *node_bootmem_map;
    unsigned long last_offset;
    unsigned long last_pos;
} bootmem_data_t;
extern unsigned long init_bootmem (unsigned long start, unsigned long pages);
extern void free_bootmem (unsigned long addr, unsigned long size);
extern void reserve_bootmem (unsigned long addr, unsigned long size);
extern unsigned long free_all_bootmem (void);

#endif
